import express from 'express'
import cityRocuter from './router/city.js'
import verifycodeRouter from './router/verifycode.js'
import userInfo from './router/user'
import coupons from './router/coupons'
import points_mall from './router/points'
import addressAdd from './router/address'
import cors from 'cors'
import uploaderFile from "./router/uploader"
import Food from "./router/food"
import UserName from "./router/userName"
const app = express()
// 跨域
app.use(cors())
// 解析json
app.use(express.json())
// 路由
app.use('/data', cityRocuter)
app.use('/code', verifycodeRouter)
app.use('/data', addressAdd)
app.use('/user',userInfo)
app.use('/data',uploaderFile)
app.use('/coupons',coupons)
app.use('/points',points_mall)
app.use('/food',Food)
app.use("/userName",UserName)
//监听端口号4000
app.listen(4000, () => {
    console.log('http://localhost:4000');
})